import axios from '../axios'

export const orderList = (params) => {
    return axios.post(`order/list`, params)
}

export const statisticsByDay = (params) => {
    return axios.post(`order/statistics/day`, params)
}

export const statisticsByToday = () => {
    return axios.post(`order/statistics/count/today`)
}

export const orderWaitList = (id) => {
    return axios.post(`order/list/wait/` + id)
}

export const orderDetail = (orderId) => {
    return axios.get(`order/` + orderId)
}

export const completeOrder = (orderId) => {
    return axios.get(`order/complete/` + orderId)
}

export const printer = (params) => {
    return axios.post(`http://127.0.0.1:9544/food/client/printer`, params)
}

export const getReturnList = (params) => {
    return axios.post(`order/getReturnList`, params)
}

export const handleReturnApply = (params) => {
    return axios.post(`order/handleReturnApply`, params)
}

export const getWaitHandleData = () => {
    return axios.get(`order/getWaitHandleData`)
}

export const isReturnDistributionFee = (params) => {
    return axios.get(`order/isReturnDistributionFee`, {params: params})
}

export const salesList = (params) => {
    return axios.post(`order/sales/list`, params)
}
